<template>
  <view class="flex-col page">
    <view class="flex-col section_1">
      <view class="flex-col section_2">
        <text class="button">拨打电话</text>
        <text class="text">确认拨打电话{{phoneNumber}}吗？</text>
        <view class="flex-row group">
          <view class="flex-col items-center text-wrapper_1" @click="click"><text class="text_2" >确认</text></view>
        </view>
      </view>
      <image
        src="https://project-user-resource-1256085488.cos.ap-guangzhou.myqcloud.com/62ac1d455a7e3f03100b6468/62b188edd029820011534ee0/16558160786062364179.png"
        class="image"  @click="click2"
      />
    </view>
  </view>
</template>

<script>
    import {getVirtualPhone} from '../../api/index.js'
  export default {
    components: {},
    data() {
      return {
          phoneNumber:''
      };
    },
    onLoad(a) {
		this.phoneNumber = "13041430152"
        // let data = JSON.parse(decodeURIComponent(a.data))
        // console.log("专家id",a);
        // let that=this
        // getVirtualPhone(data).then(res=>{
        //     console.log("拨打电话",res);
        //     that.phoneNumber=res.message
        // })
    },
    methods: {
        click(){
            uni.makePhoneCall({
            	phoneNumber: this.phoneNumber //仅为示例
            });
        },
        click2(){
            uni.navigateBack({
                delta:1
            })
        }
    },
  };
</script>
<style>
    page{
         background-color: #00000099;
    }
</style>
<style scoped lang="css">
  .page {
    background-color: #ffffff;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
  }
  .section_1 {
    padding: 14.81rem 3.34rem 11.97rem;
  }
  .section_2 {
    margin-right: 0.19rem;
    padding: 0.91rem 1.06rem 1.56rem 1.09rem;
    background-color: #ffffff;
    border-radius: 0.47rem;
  }
  .image {
    margin-top: 1.25rem;
    align-self: center;
    width: 2.13rem;
    height: 2.13rem;
  }
  .button {
    align-self: center;
    color: #333333;
    font-size: 1rem;
    font-family: SourceHanSansCN;
    font-weight: 500;
    line-height: 0.94rem;
  }
  .text {
    margin-top: 2.75rem;
    align-self: center;
    color: #999999;
    font-size: 0.88rem;
    font-family: SourceHanSansCN;
    line-height: 0.84rem;
  }
  .group {
    margin-top: 2.22rem;
  }
  .text-wrapper {
    padding: 0.75rem 0 0.72rem;
    flex: 1 1 6.63rem;
    background-color: #c6c8d9;
    border-radius: 1.16rem;
    height: 2.31rem;
  }
  .text-wrapper_1 {
    margin-left: 1.16rem;
    padding: 0.75rem 0;
    flex: 1 1 6.63rem;
    background-color: #6d79fe;
    border-radius: 1.16rem;
    height: 2.31rem;
  }
  .text_1 {
    color: #63667d;
    font-size: 0.88rem;
    font-family: SourceHanSansCN;
    line-height: 0.84rem;
  }
  .text_2 {
    color: #ffffff;
    font-size: 0.88rem;
    font-family: SourceHanSansCN;
    line-height: 0.81rem;
  }
</style>